{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a2c3c325",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sqlalchemy import create_engine\n",
    "from sqlalchemy.ext.declarative import declarative_base\n",
    "from sqlalchemy.orm import sessionmaker\n",
    "\n",
    "SQLALCHEMY_DATABASE_URL = \"sqlite:///./sql_app.db\"\n",
    "# SQLALCHEMY_DATABASE_URL = \"postgresql://user:password@postgresserver/db\"\n",
    "\n",
    "engine = create_engine(\n",
    "    SQLALCHEMY_DATABASE_URL, connect_args={\"check_same_thread\": False}\n",
    ")\n",
    "SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\n",
    "\n",
    "Base = declarative_base()\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
